
using QdbUnit;
using QdbUnit.Extensions;
using QdbUnit.Extensions.Fixtures;
using Qdb.Config;
using Qdb.Internal;

namespace Qdb.Tests.Common.Header
{
	public class ConfigurationSettingsTestCase : AbstractQdbTestCase, IOptOutMultiSession
	{
		/// <exception cref="System.Exception"></exception>
		[System.ObsoleteAttribute]
		public virtual void TestChangingUuidSettings()
		{
			Fixture().Config().GenerateUUIDs(0);
			Reopen();
			Assert.AreEqual(ConfigScope.Globally, GenerateUUIDs());
			Db().Configure().GenerateUUIDs(-1);
			Assert.AreEqual(ConfigScope.Disabled, GenerateUUIDs());
			Fixture().Config().GenerateUUIDs(0);
			Reopen();
			Assert.AreEqual(ConfigScope.Globally, GenerateUUIDs());
		}

		private ConfigScope GenerateUUIDs()
		{
			return ((LocalObjectContainer)Db()).Config().GenerateUUIDs();
		}
	}
}
